package cn.edu.imau.zy.student.mapper;

import cn.edu.imau.zy.common.core.entity.student.StLeave;
import cn.edu.imau.zy.student.dto.LocalDateRange;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 学生请假Mapper接口
 *
 * @author wyz
 * @date 2020-07-01
 */
public interface StLeaveMapper {
    /**
     * 查询学生请假
     *
     * @param id 学生请假ID
     * @return 学生请假
     */
    public StLeave selectStLeaveById(Long id);

    /**
     * 查询学生请假列表
     *
     * @param stLeave 学生请假
     * @return 学生请假集合
     */
    public List<StLeave> selectStLeaveList(StLeave stLeave);

    /**
     * 新增学生请假
     *
     * @param stLeave 学生请假
     * @return 结果
     */
    public int insertStLeave(StLeave stLeave);

    /**
     * 修改学生请假
     *
     * @param stLeave 学生请假
     * @return 结果
     */
    public int updateStLeave(StLeave stLeave);

    /**
     * 删除学生请假
     *
     * @param id 学生请假ID
     * @return 结果
     */
    public int deleteStLeaveById(Long id);

    /**
     * 批量删除学生请假
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteStLeaveByIds(String[] ids);

    List<StLeave> selectStLeaveListByTeacherId(String teacherId);

    int checkHave(StLeave stLeave);

    Map<String, Object> monthCount(@Param("params") Map<String, Object> params);

    List<LocalDateRange> monthLeaveDay(@Param("params") Map<String, Object> params);

    List<StLeave> dayLeave(@Param("params") Map<String, Object> params);

    List<Map<String, String>> deptLeave();

    List<Map<String, String>> deptGreadLeave(@Param("params") Map<String, Object> params);

    List<Map<String, String>> classesLeave(@Param("params") Map<String, Object> params);

    List<Map<String, String>> classesDetailLeave(@Param("params") Map<String, Object> params);

    List<Map<String, Object>> countInged(@Param("params") Map<String, Object> params);
}
